Repository navigation
Conversation
|
Hi @mvanhorn, thx for submitting this! Your timing is actually incredibly funny in a way, since I just pushed a large update to git-sim earlier today, releasing v0.4.0 which overhauls git-sim in multiple major ways that I believe make it a significantly better tool. That being said, I don't believe the checkout -b takes the start point argument which is the purpose of this PR. Would you mind upgrading to git-sim v0.4.0 (latest on main) and resubmitting the PR against that version of the codebase? I appreciate your time and contribution, and would love to get that fix merged in with you as the contributor. |
The command now accepts one optional start point with -b and validates that it resolves to a commit. The scene draws the target history when needed, places the new branch and HEAD at the target, and keeps the original branch at its previous commit. Remote-tracking start points receive a remote label and an upstream explanation. The command title, CLI help, and README include the new argument. Fixes initialcommit-com#109 Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
03b92bb to
cc88af1
Compare
|
thanks @initialcommit-io, congrats on v0.4.0! turns out this branch was already sitting on top of the v0.4.0 changes, so the start-point fix carried over as is. rebased it onto latest main in cc88af1 and added validation cases + goldens for it: checkout-new-at, checkout-new-tracking, plus the bad start point and too-many-args errors. |
The command now accepts one optional start point with -b and validates that it resolves to a commit. Users cannot give checkout -b a commit, branch, or tag to start the new branch from.
The scene and validation test run passed all 48 tests, including the added abbreviated-commit checkout test, with one deprecation warning.
Fixes #109